from pagemagic import core

def get_path_from_request(request):
    assert hasattr(request, 'path_without_language'), 'Add "pagemagic.utils.i18n.middleware.LocaleFromUrlMiddleware" to MIDDLEWARE_CLASSES in your settings.py file'
    return request.path_without_language

old_get_path_from_request = core.get_path_from_request
core.get_path_from_request = get_path_from_request
